package com.squirrel.common.controller;


import com.squirrel.common.annotation.AuthToken;
import com.squirrel.common.entity.Banner;
import com.squirrel.common.response.ResponseResult;
import com.squirrel.common.response.ResponseResultUtils;
import com.squirrel.common.response.code.CodeEnum;
import com.squirrel.common.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * BannerController 轮播图控制器
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@RestController
@RequestMapping("/api/banner")
@Api(tags = "轮播图控制器")
public class BannerController {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/getList")
    @ApiOperation("轮播图列表")
    public ResponseResult<List<Banner>> getList() {
        return ResponseResultUtils.success(CodeEnum.SUCCESS, bannerService.getList());
    }

}
